 //
//  HZ_Find_Two_CollectionReusableView.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/3/31.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HZ_Find_Two_CollectionReusableView.h"

@interface HZ_Find_Two_CollectionReusableView ()

@property (nonatomic, strong) UILabel *label;
@property (nonatomic, strong) UILabel *labelTwo;
@property (nonatomic, strong) UILabel *morelabel;
@property (nonatomic, strong) UIButton *morebutton;

@end

@implementation HZ_Find_Two_CollectionReusableView




- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        
//        self.backgroundColor = [UIColor clearColor];
        
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width / 3, self.bounds.size.height)];
        _label.backgroundColor = [UIColor clearColor];
        [self addSubview:_label];
        
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 1)];
        view.backgroundColor = [UIColor colorWithWhite:0.797 alpha:1.000];
        [self addSubview:view];
        self.labelTwo = [[UILabel alloc] initWithFrame:CGRectMake( self.bounds.size.width / 4.5, 0,  self.bounds.size.width / 3, self.bounds.size.height)];
        self.labelTwo.backgroundColor = [UIColor clearColor];
//        _labelTwo.backgroundColor = [UIColor colorWithRed:1.000 green:0.736 blue:0.626 alpha:1.000];
        _labelTwo.textColor = [UIColor colorWithWhite:0.632 alpha:1.000];
        _labelTwo.font = [UIFont systemFontOfSize:12];
        [self addSubview:_labelTwo];
        
//        self.morelabel = [[UILabel alloc] initWithFrame:CGRectMake(2 * self.bounds.size.width / 3, 0,  self.bounds.size.width / 3, self.bounds.size.height)];
//        _morelabel.backgroundColor = [UIColor colorWithRed:0.754 green:0.360 blue:1.000 alpha:1.000];
//        _morelabel.text = @"更 多 ⥤";
//        _morelabel.textAlignment = NSTextAlignmentCenter;
//        _morelabel.font = [UIFont systemFontOfSize:23];
//        [self addSubview:_morelabel];
    
        self.morebutton = [UIButton buttonWithType:UIButtonTypeCustom];
        _morebutton.frame = CGRectMake(2 * self.bounds.size.width / 2.7, 0,  self.bounds.size.width / 3, self.bounds.size.height);
        [_morebutton setTitle:@"更多⥤" forState:UIControlStateNormal];
        [_morebutton setTitleColor:[UIColor colorWithWhite:0.552 alpha:1.000] forState:UIControlStateNormal];
        [_morebutton addTarget:self action:@selector(MoreButtonAction:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_morebutton];
        
    }
    return self;
}

-(void)setModel:(HZ_Find_Model *)model{
    
    _model = model;
    
    _label.text = _model.name;
    
    _labelTwo.text = _model.desc;
    
}

#pragma mark - 更多按钮的点击事件
-(void)MoreButtonAction:(UIButton *)sender {
    NSNotificationCenter *cslcenter = [NSNotificationCenter defaultCenter];
    
    [cslcenter postNotificationName:@"Click" object:@"push"];
}





/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
